﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="tabTransactions.ascx.cs" Inherits="CustomerService.TransactionsTab" %>
<asp:ListView ID="listViewTransactions" runat="server">
    <LayoutTemplate>
        <table class="ItemList" cellpadding="3" cellspacing="0">
            <tr style="font-weight: bold;">
                <td>Date</td>
                <td>Response Date</td>
                <td>Type</td>
                <td>Status</td>
                <td>Retry</td>
                <td>Order</td>
            </tr>
            <tr id="itemPlaceholder" runat="server"></tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr>
            <td><%# Eval("CreateDate") %></td>
            <td><%# Eval("ResponseDate") %></td>
            <td><%# Eval("TransactionType.Description") %> </td>
            <td><%# Eval("TransactionStatus.Description") %></td>
            <td><%# Eval("RetryCount") %></td>
            <td><%# Eval("OrderID") %></td>
        </tr>
        <tr>
            <td></td>
            <td colspan="4">
                <asp:ListView ID="listViewTransactionDetail" runat="server"  DataSource="<%# ((CustomerService.tblTransaction)Container.DataItem).TransactionDetails %>">
                    <LayoutTemplate>
                        <table class="" cellpadding="3" cellspacing="0">
                            <tr>
                                <td>Account</td>
                                <td>Debit</td>
                                <td>Credit</td>
                            </tr>
                            <tr id="itemPlaceholder" runat="server"></tr>
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td><%# Eval("Account.DisplayName") %></td>
                            <td><%# Eval("Debit") %></td>
                            <td><%# Eval("Credit") %></td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
            </td>
        </tr>
    </ItemTemplate>
</asp:ListView>
